Some major causes of backbiting:
Anger – Anger is a cause which should be brought under complete control. If you are determined to take revenge upon a person out of anger, know that you are committing a sin as Allah has prohibited you from that.
To support the opinion of friends – Its medicine is to oppose the opinion of friends in the matter of back-biting a man. Would you rather please your friends than pleasing God?
To show one’s piety by backbiting another – You should know that in that case God’s wrath will fall on you and that you are courting destruction in the next world absolving yourself from guilt in this world. You should also know that you are losing all your virtues by back-biting.
To consider oneself pure and disclose one’s prestige and pride – The medicine is to know that your glory and dignity may vanish and the people may look down upon you.
Envy – Its medicine is as follows. You should know that if you envy anybody for his riches and honour in the world, you will be burnt by the fire of envy in this world in addition to your being burnt in Hell-fire.
Ridicule – You should know that you have ridiculed a person in presence of some people, but you will be ridiculed before all the creatures in the next world.
To express astonishment at the conduct of others – It is a mockery which is an act of sin.
Imam Ghazali’s book “Revival of Religious Sciences”
Cases in which backbiting is allowed
1- Complaining. It is permissible for the one who has been wronged to complain to the ruler or judge and others who have the authority or ability to settle the score with the one who wronged him.
2- Seeking help to change evil and bring the sinner back to the right path, so he may say to the one who he hopes is able to do something: “So and so is doing such and such; tell him not to do it.”
3- Seeking advice or a fatwa (religious ruling), by saying to the mufti (scholar), “So and so/my father/my brother has wronged me by doing such and such, does he have the right to do that? How can I solve this problem and ward off his harm from me?”
4- Warning the Muslims of someone’s evil, such as highlighting the weakness of some reporters or witnesses or authors. That also includes seeing someone buying faulty goods, or someone keeping company with one who is a thief or adulterer or giving a female relative of his to such a man in marriage, and the like. You should tell them about that by way of sincere advice, not with the aim of causing harm and spreading mischief.
5- If a person openly commits evil or follows bid’ah (innovation), such as drinking alcohol and seizing people’s wealth unlawfully, it is permissible to speak of what he is doing openly, but it is not permissible to speak against him any other way, unless it is for another reason.
6- For identification, if someone is known by a nickname such as the dim-sighted one, or the blind man or the one-eyed or the lame one, it is permissible to identify him as such, but it is haraam (impermissible) to mention that by way of belittling him, and if it is possible to identify him in some other way, that is better.